import request from "@/utils/request"

export function queryMyDevicePage(data) {
  return request({
    url: "/deviceShow/queryMyDevicePage",
    method: "get",
    params: data
  })
}

export function queryDeviceRealDataInfo(data) {
  return request({
    url: "/deviceShow/queryDeviceRealDataInfo",
    method: "get",
    params: data
  })
}

export function queryRealTimeDataPullDown(data) {
  return request({
    url: "/real/queryRealTimeDataPullDown",
    method: "get",
    params: data
  })
}

export function queryDeviceGjDataPage(data) {
  return request({
    url: "/deviceShow/queryDeviceGjDataPage",
    method: "get",
    params: data
  })
}

export function queryDeviceGzDataPage(data) {
  return request({
    url: "/deviceShow/queryDeviceGzDataPage",
    method: "get",
    params: data
  })
}

export function queryDeviceGjDetailData(data) {
  return request({
    url: "/deviceShow/queryDeviceGjDetailData",
    method: "get",
    params: data
  })
}

export function queryDeviceGZPage(data) {
  return request({
    url: "/deviceShow/queryDeviceGZPage",
    method: "get",
    params: data
  })
}

export function queryDeviceGzDetailData(data) {
  return request({
    url: "/deviceShow/queryDeviceGzDetailData",
    method: "get",
    params: data
  })
}

// 查询设备数据看板配置接口
export function queryDeviceDashboard(data) {
  return request({
    url: "/deviceShow/queryDeviceDashboard",
    method: "get",
    params: data
  })
}

// 查询设备的某个参数实时值
export function queryDeviceRealOnePar(data) {
  return request({
    url: "/real/queryDeviceRealOnePar",
    method: "get",
    params: data
  })
}

// 查询设备的折线图与柱状图数据
export function queryDeviceRealTB(data) {
  return request({
    url: "/real/queryDeviceRealTB",
    method: "get",
    params: data
  })
}

// 查询设备饼状图信息数据
export function queryDeviceRealBZT(data) {
  return request({
    url: "/real/queryDeviceRealBZT",
    method: "get",
    params: data
  })
}

// 配置设备的数据看板
export function updateDeviceDashboard(data) {
  return request({
    url: "/deviceShow/updateDeviceDashboard",
    method: "post",
    data
  })
}

// 取消配置设备的数据看板
export function deleteMyDasPartOne(data) {
  return request({
    url: "/deviceShow/deleteMyDasPartOne",
    method: "post",
    data
  })
}

// 查询设备堆叠图信息数据
export function queryDeviceYDL(data) {
  return request({
    url: "/real/queryDeviceYDL",
    method: "get",
    params: data
  })
}

//开合闸
export function makeDeviceOpOrClose(data) {
  return request({
    url: "/mqtt/makeDeviceOpOrClose",
    method: "post",
    data: data
  })
}

//分页应用场景异常数据接口(监控中心)
export function queryPageApplicationScenarios(data) {
  return request({
    url: "/bApplicationScenarios/queryPageApplicationScenarios",
    method: "get",
    params: data
  })
}

// 设备故障记录（监控中心)
export function queryPageDDeviceGZMain(data) {
  return request({
    url: "/bApplicationScenarios/queryPageDDeviceGZMain",
    method: "get",
    params: data
  })
}

// 折线图（监控中心)
export function dDeviceGZMainZX(data) {
  return request({
    url: "/bApplicationScenarios/DDeviceGZMainZX",
    method: "get",
    params: data
  })
}

// 折线图（监控中心)
export function DDeviceGJMainZX(data) {
  return request({
    url: "/bApplicationScenarios/DDeviceGJMainZX",
    method: "get",
    params: data
  })
}

// 折线图（监控中心)
export function queryPageDDeviceGZMainByTime() {
  return request({
    url: "/bApplicationScenarios/queryPageDDeviceGZMainByTime",
    method: "get"
  })
}

// 查询设备故障明细分页【分页接口】
export function queryDeviceGztkDataPage(data) {
  return request({
    url: "/deviceShow/queryDeviceGztkDataPage",
    method: "get",
    params: data
  })
}

// 查询系统控制操作记录分页【分页接口】
export function queryDeviceDoPage(data) {
  return request({
    url: "/deviceShow/queryDeviceDoPage",
    method: "get",
    params: data
  })
}

// 查询设备故障明细详情页
export function queryDeviceGztkDetail(data) {
  return request({
    url: "/deviceShow/queryDeviceGztkDetail",
    method: "get",
    params: data
  })
}

// 分页设备告警记录
export function queryPageDDeviceGJ(data) {
  return request({
    url: "/bApplicationScenarios/queryPageDDeviceGJ",
    method: "get",
    params: data
  })
}

// 是否展示合闸和分闸按钮
export function queryIsShowButton(data) {
  return request({
    url: "/deviceShow/queryIsShowButton",
    method: "get",
    params: data
  })
}

// 获取控制设备开关的验证码
export function getSmsCode(data) {
  return request({
    url: "/mqtt/getSmsCode",
    method: "post",
    data: data
  })
}

// 设备管理控制设备开关(验证码)
export function makeDeviceOpOrCloseSms(data) {
  return request({
    url: "/mqtt/makeDeviceOpOrCloseSms",
    method: "post",
    data: data
  })
}

// 查询拓扑实时负载页面
export function queryDeviceGradeInitMainPage(data) {
  return request({
    url: "/bDeviceGrade/queryDeviceGradeInitMainPage",
    method: "get",
    params: data
  })
}

// 查询拓扑图初始化弹窗
export function addDeviceGradeInit(data) {
  return request({
    url: "/bDeviceGrade/addDeviceGradeInit",
    method: "post",
    data: data
  })
}

// 查询拓扑实时负载详情页面
export function queryDeviceGradeInitDetailPage(data) {
  return request({
    url: "/bDeviceGrade/queryDeviceGradeInitDetailPage",
    method: "get",
    params: data
  })
}

export function queryParamCanUpdateList(data) {
  return request({
    url: "/deviceSet/queryParamCanUpdateList",
    method: "get",
    params: data
  })
}

export function queryControlList(data) {
  return request({
    url: "/deviceShow/queryControlList",
    method: "get",
    params: data
  })
}

export function saveParamCanUpdate(data) {
  return request({
    url: "/mqtt/makeDeviceChange",
    method: "post",
    data: data
  })
}

export function makeDeviceControl(data) {
  return request({
    url: "/mqtt/makeDeviceControl",
    method: "post",
    data: data
  })
}

export function makeDeviceControlSms(data) {
  return request({
    url: "/mqtt/makeDeviceControlSms",
    method: "post",
    data: data
  })
}

export function queryDeviceFirmware(data) {
  return request({
    url: "/deviceShow/queryDeviceFirmware",
    method: "get",
    params: data
  })
}

export function queryFirmwareSendPage(data) {
  return request({
    url: "/deviceShow/queryFirmwareSendPage",
    method: "get",
    params: data
  })
}

export function queryFirmwareSendDetail(data) {
  return request({
    url: "/deviceShow/queryFirmwareSendDetail",
    method: "get",
    params: data
  })
}

export function updateDeviceFirmware(data) {
  return request({
    url: "/deviceShow/updateDeviceFirmware",
    method: "post",
    data: data
  })
}

export function insertInitFirmware(data) {
  return request({
    url: "/deviceShow/insertInitFirmware",
    method: "post",
    data: data
  })
}
